//
// Created by ashCheng on 2022/9/7.
//
#include <iostream>

int main()
{
  int sum = 0;
  //sum 用于存放从1到10所有数的和
  for (int val = 1; val <= 10; val++) {
    sum += val; //等价于 sum = sum + val;
  }
  std::cout << "Sum of 1 to 10 is " << sum << std::endl;
  return 0;
}